xen/arm: mm: Change the return value of gvirt_to_maddr
authorJulien Grall <julien.grall@linaro.org>
Wed, 15 Nov 2017 19:34:13 +0000 (19:34 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 16 Nov 2017 01:35:49 +0000 (17:35 -0800)
commit17a33f943ea93daa7e8c61faad6d1dfd16176761
treef937c55647e3cb41d0e73d2686ed8862e30d5ca1
parentb9ee1fd7b98064cf27d0f8f1adf1f5359b72c97f
xen/arm: mm: Change the return value of gvirt_to_maddr

Currently, gvirt_to_maddr return -EFAULT when the translation failed.
It might be useful to return the PAR_EL1 (Physical Address Register)
in such a case to get a better idea of the reason.

So modify the return value to use 0 on success or return the PAR on
failure.

The callers are modified to reflect the change of the return value.

Note that with the change in gvirt_to_maddr, ma needs to be initialized
to avoid GCC been confused (i.e value may be uninitialized) with the new
construction.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c
xen/arch/arm/kernel.c
xen/arch/arm/p2m.c
xen/include/asm-arm/mm.h